package com.antcom.antread.antreaddatacrawl.himalayaData.entity;

import java.util.Date;
import java.util.List;
import javax.persistence.*;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.antcom.antread.common.core.baseRest.domain.BaseDomain;
import org.hibernate.annotations.*;

/**
 * xmlabookinfo
 *
 * @author antCom
 * @version 1.0.0 2020-11-28
 */
@Entity
@Table(name = "xmlabookinfo")
public class BookInfo extends BaseDomain {

    /**
     * 主键
     */
    @Id
    @Column(name = "book_id", length = 36)
    private String bookId;

    /**
     * 书籍名称
     */
    @Column(name = "book_name", nullable = true, length = 255)
    private String bookName;

    /**
     * 图片路径
     */
    @Column(name = "book_picture", nullable = true, length = 255)
    private String bookPicture;

    /**
     * 喜马拉雅id
     */
    @Column(name = "himalaya_id", nullable = true, length = 255)
    private String himalayaId;

    /**
     * 书籍路径
     */
    @Column(name = "book_url", nullable = true, length = 255)
    private String bookUrl;

    /**
     * 标题
     */
    @Column(name = "book_author", nullable = true, length = 255)
    private String bookAuthor;

    /**
     * 详情说明
     */
    @Column(name = "book_description", nullable = true, length = 10000)
    private String bookDescription;

    /**
     * 标签
     */
    @Column(name = "book_tag", nullable = true, length = 255)
    private String bookTag;

    /**
     * 创建时间
     */
    @Column(name = "create_time", nullable = true, length = 10)
    private Date createTime;

    @OneToMany(mappedBy = "bookId", cascade = {CascadeType.DETACH}, fetch = FetchType.LAZY)
    @NotFound(action = NotFoundAction.IGNORE)
    private List<BCmiddle> bCmiddles;

    /**
     * 获取主键
     *
     * @return 主键
     */
    public String getBookId() {
        return this.bookId;
    }

    /**
     * 设置主键
     *
     * @param bookId 主键
     */
    public void setBookId(String bookId) {
        this.bookId = bookId;
    }

    /**
     * 获取书籍名称
     *
     * @return 书籍名称
     */
    public String getBookName() {
        return this.bookName;
    }

    /**
     * 设置书籍名称
     *
     * @param bookName 书籍名称
     */
    public void setBookName(String bookName) {
        this.bookName = bookName;
    }

    /**
     * 获取图片路径
     *
     * @return 图片路径
     */
    public String getBookPicture() {
        return this.bookPicture;
    }

    /**
     * 设置图片路径
     *
     * @param bookPicture 图片路径
     */
    public void setBookPicture(String bookPicture) {
        this.bookPicture = bookPicture;
    }

    /**
     * 获取标题
     *
     * @return 标题
     */
    public String getBookAuthor() {
        return this.bookAuthor;
    }

    /**
     * 设置标题
     *
     * @param bookAuthor 标题
     */
    public void setBookAuthor(String bookAuthor) {
        this.bookAuthor = bookAuthor;
    }

    /**
     * 获取详情说明
     *
     * @return 详情说明
     */
    public String getBookDescription() {
        return this.bookDescription;
    }

    /**
     * 设置详情说明
     *
     * @param bookDescription 详情说明
     */
    public void setBookDescription(String bookDescription) {
        this.bookDescription = bookDescription;
    }

    /**
     * 获取标签
     *
     * @return 标签
     */
    public String getBookTag() {
        return this.bookTag;
    }

    /**
     * 设置标签
     *
     * @param bookTag 标签
     */
    public void setBookTag(String bookTag) {
        this.bookTag = bookTag;
    }


    /**
     * 获取创建时间
     *
     * @return 创建时间
     */
    public Date getCreateTime() {
        return this.createTime;
    }

    public String getHimalayaId() {
        return himalayaId;
    }

    public void setHimalayaId(String himalayaId) {
        this.himalayaId = himalayaId;
    }

    public String getBookUrl() {
        return bookUrl;
    }

    public void setBookUrl(String bookUrl) {
        this.bookUrl = bookUrl;
    }

    /**
     * 设置创建时间
     *
     * @param createTime 创建时间
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public List<BCmiddle> getbCmiddles() {
        return bCmiddles;
    }

    public void setbCmiddles(List<BCmiddle> bCmiddles) {
        this.bCmiddles = bCmiddles;
    }
}